<?php
$this->breadcrumbs=array(
	'Clubs'
);

//Posar nom a la pàgina
$this->pageTitle="Citius|Clubs";

$this->menu=array(
	//array('label'=>'Llistar clubs', 'url'=>array('index')),
	array('label'=>'Crear club', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('club-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Clubs</h1>

<p>
Podeu entrar un operador (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
o <b>=</b>) davant de cada valor de cerca per especificar un criteri de búsqueda.
</p>

<?php echo CHtml::link('Cerca avançada','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'club-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
        'nom',
		'idClub',
		'dataAlta',
		'domicili',
		'codiPostal',
		'poblacio',
		/*
		'provincia',
		'CIF',
		'telFix',
		'telMobil',
		'eMail',
		'web',
		'directorNom',
		'directorMobil',
		'directorEMail',
		*/
        array(
            'header'=>'Esportistes',
            'value'=>'$data->esportistesComptador',
        ),
		array(
			'class'=>'CButtonColumn',
		),
	),
)); 
?>
